<%-- 
    Document   : sanphamchinh
    Created on : 30-09-2011, 15:44:08
    Author     : Mr-Nguyen
--%>

<%@page import="DatabasePOJO.sanpham"%>
<%@page import="java.util.ArrayList"%>
<%@page import="DAO.sanphamDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    ArrayList<sanpham> arrsp  = sanphamDAO.getListSanPham("");
%>
<table width="100%" height="380" border="0">
          <tr>
              <td height="71" colspan="2" background="Images/backngang.gif">
                  <a href="index.jsp?Action=chitiet&MaSanPham=<%= arrsp.get(0).getMaSanPham() %>"><%= arrsp.get(0).getTitle() %></a>
              </td>
            </tr>
          <tr>
            <td width="62%" height="250">
                <a href="index.jsp?Action=chitiet&MaSanPham=<%= arrsp.get(0).getMaSanPham() %>"> <img src="Images/<%= arrsp.get(0).getHinhDaiDien() %>" width="100%" height="300px"/></a>
            </td>
            <td width="38%" valign="top">
            <table width="100%" height="300px" border="0" background="Images/backtable.gif">
              <tr>
                  <td height="50px" colspan="2" style="background-repeat: no-repeat; background-position: center" background="Images/buy.png">
              <center><b><%= arrsp.get(0).getGiaKhuyenMai() %></b>VNĐ</center>
                  </td>
                </tr>
               <tr>
                   <td height="51" style="text-decoration: line-through;" background="Images/backlogo.gif"><center><%= arrsp.get(0).getGiaBan() %>VNĐ </center></td>
                  <td background="Images/backlogo.gif"><center> <%= Integer.parseInt(arrsp.get(0).getGiaBan()) - Integer.parseInt(arrsp.get(0).getGiaKhuyenMai())  %>VNĐ</center></td>
              </tr>
              <tr>
                <td height="59" colspan="2" background="Images/backngang.gif">
                    <center><b><%= arrsp.get(0).getLuotMua() %> Lược mua</b></center>
                </td>
                </tr>
              <tr>
                  <td height="89" colspan="2" >
                      <jsp:include page="tinhthoigian.jsp" >
                          <jsp:param name="ngay" value="<%= arrsp.get(0).getNgayHetHang() %>"/>
                      </jsp:include>
                  </td>
                <!--<td height="89" colspan="2">Thời gian còn lại</td>-->
                </tr>
            </table>
